module RequirementHelper
  def requirement_status(re)
    endtime=re.created_at+re.expiration.to_i.days
    return "已过期" if Time.now > endtime
    case re.status
      when "begined"
        str = "已开始"
      when "ordered"
        str = "已接单"
      when "solved"
        str = "已解决"
      when "expired"
        str = "已过期"
    end
    str
  end
  
end
